<?php
/**
 * Created by PhpStorm.
 * User: l-eru
 * Date: 2018/6/13
 * Time: 13:09
 */

namespace App\Controller;


use Core\Model;
use Core\TbRedis;
use Swoole\Http\Request;
use Swoole\Http\Response;

class Controller
{
    /**
     * @var Model $db
     */
    protected $db;

    /**
     * @var \Redis $redis
     */
    protected $redis;

    /**
     * @var Request $request
     */
    protected $request;

    /**
     * @var Response $response
     */
    protected $response;

    public function __construct($request, $response)
    {
        $this->db = Model::init('http_request');
        $this->redis = TbRedis::init('http_request');

        $this->request = $request;
        $this->response = $response;
    }
}